﻿<UserControl x:Class="SymbolEditor.WpfLibrary.UCMainWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:esriConverters="clr-namespace:ESRI.ArcGIS.Client.ValueConverters;assembly=ESRI.ArcGIS.Client"
         Height="359" Width="592" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
<Grid Name="MyGrid" >
        <Grid.Resources>
            <esriConverters:DictionaryConverter x:Key="MyDictionaryConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions >
            <RowDefinition Height="54*" />
            <RowDefinition Height="257*" />

        </Grid.RowDefinitions>
        <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,14,195,0" Name="cmbSymbolLib" VerticalAlignment="Top" Width="232" SelectedIndex="0" ItemsSource="{Binding}" SelectionChanged="cmbSymbolLib_SelectionChanged">
            <ComboBoxItem Content="选择符号库……" Foreground="{StaticResource {x:Static SystemColors.ActiveBorderBrushKey}}" Tag="sysSelect" IsSelected="True" />
            <ComboBoxItem Content="新建符号库" Foreground="{StaticResource {x:Static SystemColors.HighlightBrushKey}}" Tag="sysNew" />
            <ComboBoxItem Content="添加符号库" Foreground="{StaticResource {x:Static SystemColors.HighlightBrushKey}}" Tag="sysAppend" />
        </ComboBox>
        <Label Content="Symbol Library" Height="28" HorizontalAlignment="Left" Margin="24,12,0,0" Name="label1" VerticalAlignment="Top" Width="113" />
        <Border  Grid.Row="1">
            <esri:Map  Grid.Row="1" Name="MyMap" VerticalAlignment="Top" Width="auto" Height="257" IsLogoVisible="False" Extent="-130,10,-70,60" >
                <esri:Map.Layers>
                    <esri:GraphicsLayer ID="SymbolViewer" MouseEnter="GraphicsLayer_MouseEnter" MouseLeave="GraphicsLayer_MouseLeave" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown" MouseRightButtonDown="GraphicsLayer_MouseRightButtonDown">
                        <esri:GraphicsLayer.MapTip>
                            <Border CornerRadius="10" BorderBrush="#FF222957" BorderThickness="3" Margin="0,0,15,15">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188">
                                        <GradientStop Color="#FFD1DFF2"/>
                                        <GradientStop Color="#FF0088FF" Offset="0.946"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border.Effect>
                                    <DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" />
                                </Border.Effect>

                                <Grid Background="LightYellow">
                                    <StackPanel Margin="5">
                                        <TextBlock Text="Symbol ID: " />
                                        <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter}, 
                                    ConverterParameter=KEY, Mode=OneWay}" FontWeight="Bold" />
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="Symbol Set: " />
                                            <TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter},
                                        ConverterParameter=SET, Mode=OneWay}" FontWeight="Bold"  />
                                        </StackPanel>
                                    </StackPanel>
                                    <Border BorderBrush="Black" BorderThickness="1" />
                                </Grid>
                            </Border>
                        </esri:GraphicsLayer.MapTip>        

                    </esri:GraphicsLayer>
                </esri:Map.Layers>
            </esri:Map>

        </Border>
        <Button Content="New Symbol" Height="23" HorizontalAlignment="Left" Margin="411,14,0,0" Name="btnAddNewSymbol" VerticalAlignment="Top" Width="75" Click="btnAddNewSymbol_Click" />
    </Grid>
</UserControl>
